---------------------------------------------------------------------------------------------------------
       log:  F:\data\electoral.log
  log type:  text
 opened on:   8 Jun 2006, 15:01:13

.  #delimit ;
delimiter now ;
. *     ***************************************************************** *;
. *     ***************************************************************** *;
. *       File-Name:      electoral.do                                    *;
. *       Date:           1/22/05                                         *;
. *       Author:         MRG                                             *;
. *       Purpose:        Do-file to replicate results for CPS version    *;
. *                       of number of parties paper where dependent      *;
. *                       variable is electoral parties.                  *;
. *       Input File:     legislative_new.dta                             *;
. *       Output File:    electoral.log                                   *;
. *       Data Output:    None                                            *;
. *       Previous file:                                                  *;
. *       Machine:        Office                                          *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. set mem 10m;

Current memory allocation

                    current                                 memory usage
    settable          value     description                 (1M = 1024k)
    --------------------------------------------------------------------
    set maxvar         5000     max. variables allowed           1.733M
    set memory           10M    max. data space                 10.000M
    set matsize         150     max. RHS vars in models          0.184M
                                                            -----------
                                                                11.917M

. set matsize 150;

Current memory allocation

                    current                                 memory usage
    settable          value     description                 (1M = 1024k)
    --------------------------------------------------------------------
    set maxvar         5000     max. variables allowed           1.733M
    set memory           10M    max. data space                 10.000M
    set matsize         150     max. RHS vars in models          0.184M
                                                            -----------
                                                                11.917M

. use "C:\Documents and Settings\Matt Golder\My Documents\fsu\publications\cps2\legislative_new.dta", cle
> ar;

. *     ****************************************************************  *;
. *                           Summary Statistics                          *;
. *     ****************************************************************  *;
. sum;

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     country |         0
countrynum~r |       867     100.083    39.39866          3        199
        year |       867    1978.435    16.12735       1946       2000
     legelec |       867           1           0          1          1
    preselec |       867    .2226067    .4162364          0          1
-------------+--------------------------------------------------------
      regime |       867    .0207612    .1426664          0          1
  regime_leg |       867           0           0          0          0
    eighties |       867     .077278    .2671861          0          1
    nineties |       867    .1245675    .3304184          0          1
         old |       867    .8662053    .3406281          0          1
-------------+--------------------------------------------------------
      avemag |       843     11.2979    27.15588          1        150
   districts |       844    92.96682    141.6076          1        659
        eneg |       708    1.941652    1.227505   1.004012   14.22434
        enep |       791    3.878951    1.857447          1      14.89
 enep_others |       788    3.154099    7.559339          0       69.3
-------------+--------------------------------------------------------
       enep1 |       788    4.273211    3.811859          1      57.56
        enpp |       826    3.573923    3.853006          1      52.42
 enpp_others |       815    1.599509    6.055805          0         86
       enpp1 |       814    3.934066    7.452793          1     178.65
      enpres |       858    1.186659    1.595493          0       6.57
-------------+--------------------------------------------------------
      medmag |       702    12.72009    29.69172          1        150
      newdem |       867    .1534025    .3605831          0          1
  proximity1 |       867    .2918454    .4175579          0          1
  proximity2 |       867    .2214533    .4154646          0          1
       seats |       860     201.943    163.7675         10        672
-------------+--------------------------------------------------------
  upperseats |       817    14.89229    45.95744          0        344
   uppertier |       817    5.632791    12.65088          0      77.95
twoelections |       867    .0207612    .1426664          0          1
twoelectio~1 |       867    .0103806    .1014136          0          1

. *     ****************************************************************  *;
. *                    Relabel and Define Variables                       *;
. *     ****************************************************************  *;
. label var country  "countryname";

. label var newdem "first election as new democracy";

. label var countrynumber "countrynumber";

. label var year "year";

. label var regime "regime as of 31 December of given year 0=democracy 1=dictatorship";

. label var regime_leg "regime type at time of legislative election 0 = democracy 1=dictatorship";

. label var legelec "legislative election";

. label var preselec "presidential election";

. label var eighties "election in 1980s closest to 1985";

. label var old "elections in countries that did not transition to democracy in 1990s";

. label var nineties "elections in 1990s closest to 1995";

. label var proximity1 "proximity - continuous";

. label var proximity2 "proximity - dichotomous";

. label var enpp "parliamentary parties - uncorrected";

. label var enpp1 "parliamentary parties - corrected";

. label var enep "electoral parties - uncorrected";

. label var enep1 "electoral parties - corrected";

. label var enpres "effective number of presidential candidates";

. label var seats "assembly size";

. label var districts "number of electoral districts";

. label var avemag "average district magnitude";

. label var medmag "median district magnitude";

. label var upperseats "number of uppertier seats";

. label var uppertier "percentage of uppertier seats";

. label var eneg "effective number of ethnic groups  fearon";

. describe;

Contains data from C:\Documents and Settings\Matt Golder\My Documents\fsu\publications\cps2\legislative_n
> ew.dta
  obs:           867                          
 vars:            29                          16 Dec 2003 17:44
 size:        90,168 (99.1% of memory free)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
country         str31  %31s                   countryname
countrynumber   int    %8.0g                  countrynumber
year            int    %8.0g                  year
legelec         byte   %8.0g                  legislative election
preselec        byte   %8.0g                  presidential election
regime          byte   %8.0g                  regime as of 31 December of
                                                given year 0=democracy
                                                1=dictatorship
regime_leg      byte   %8.0g                  regime type at time of
                                                legislative election 0 =
                                                democracy 1=dictatorship
eighties        byte   %8.0g                  election in 1980s closest to
                                                1985
nineties        byte   %8.0g                  elections in 1990s closest to
                                                1995
old             byte   %8.0g                  elections in countries that did
                                                not transition to democracy in
                                                1990s
avemag          float  %9.0g                  average district magnitude
districts       int    %8.0g                  number of electoral districts
eneg            float  %9.0g                  effective number of ethnic
                                                groups  fearon
enep            float  %9.0g                  electoral parties - uncorrected
enep_others     float  %9.0g                  
enep1           float  %9.0g                  electoral parties - corrected
enpp            float  %9.0g                  parliamentary parties -
                                                uncorrected
enpp_others     float  %9.0g                  
enpp1           float  %9.0g                  parliamentary parties -
                                                corrected
enpres          float  %9.0g                  effective number of
                                                presidential candidates
medmag          float  %9.0g                  median district magnitude
newdem          byte   %8.0g                  first election as new democracy
proximity1      float  %9.0g                  proximity - continuous
proximity2      byte   %8.0g                  proximity - dichotomous
seats           int    %8.0g                  assembly size
upperseats      int    %8.0g                  number of uppertier seats
uppertier       float  %9.0g                  percentage of uppertier seats
twoelections    byte   %8.0g                  
twoelections1   byte   %8.0g                  
-------------------------------------------------------------------------------
Sorted by:  

. *     ****************************************************************  *;
. *       Would like to drop countries that have no recognizable parties  *;
. *       since I am interested in determining the number of parties.     *;
. *       Drop Kiribati, Marshall Islands, Micronesia, Nauru, Palau,      *;
. *       Lebanon (at least no votes by party), Kyrgzstan.                *;
. *       Since I am interested in competitive elections I drop the       *;
. *       elections that occurred in Colombia between 1958 and 1970 due   *;
. *       to a constitutional agreement to share power between the        *;
. *       conservative and liberal parties.                               *;
. *       Also drop the Congolese elections of 1963.  Although there were *;
. *       multiple parties permitted, all candidates ran on a single list.*;
. *       Thus, there was no actual competition in this election.         *;
. *     ****************************************************************  *;
. drop if countrynumber==163;
(6 observations deleted)

. drop if countrynumber==165;
(2 observations deleted)

. drop if countrynumber==197;
(3 observations deleted)

. drop if countrynumber==189;
(5 observations deleted)

. drop if countrynumber==146;
(12 observations deleted)

. drop if countrynumber==198;
(2 observations deleted)

. drop if countrynumber==167;
(8 observations deleted)

. drop if countrynumber==70 & year==1958;
(1 observation deleted)

. drop if countrynumber==70 & year==1960;
(1 observation deleted)

. drop if countrynumber==70 & year==1962;
(1 observation deleted)

. drop if countrynumber==70 & year==1964;
(1 observation deleted)

. drop if countrynumber==70 & year==1966;
(1 observation deleted)

. drop if countrynumber==70 & year==1968;
(1 observation deleted)

. drop if countrynumber==70 & year==1970;
(1 observation deleted)

. drop if countrynumber==12 & year==1963;
(1 observation deleted)

. sum;

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     country |         0
countrynum~r |       821     97.3715    37.35025          3        199
        year |       821     1978.35    16.15197       1946       2000
     legelec |       821           1           0          1          1
    preselec |       821    .2180268    .4131574          0          1
-------------+--------------------------------------------------------
      regime |       821    .0207065    .1424866          0          1
  regime_leg |       821           0           0          0          0
    eighties |       821    .0791717    .2701712          0          1
    nineties |       821    .1242387    .3300548          0          1
         old |       821    .8733252    .3328111          0          1
-------------+--------------------------------------------------------
      avemag |       804    11.72699    27.73206          1        150
   districts |       805    96.60373    143.9838          1        659
        eneg |       690    1.889245    1.181049   1.004012   14.22434
        enep |       782    3.878018    1.860428       1.23      14.89
 enep_others |       779    3.171412    7.596386          0       69.3
-------------+--------------------------------------------------------
       enep1 |       779    4.276418    3.829688       1.23      57.56
        enpp |       808     3.23625    1.470687          1      10.87
 enpp_others |       797    1.440527    4.762796          0       54.1
       enpp1 |       796    3.322802    1.756047          1      20.94
      enpres |       815     1.21214    1.616311          0       6.57
-------------+--------------------------------------------------------
      medmag |       664    13.30422    30.42178          1        150
      newdem |       821    .1534714     .360661          0          1
  proximity1 |       821    .2911449    .4150291          0          1
  proximity2 |       821    .2168088    .4123225          0          1
       seats |       814    210.0037    164.1061         11        672
-------------+--------------------------------------------------------
  upperseats |       778    15.61954    46.97577          0        344
   uppertier |       778    5.883021    12.88335          0      77.95
twoelections |       821    .0219245    .1465263          0          1
twoelectio~1 |       821    .0109622    .1041887          0          1

. *     ****************************************************************  *;
. *       Does it matter if I use avemag instead of medmag?               *;
. *     ****************************************************************  *;
. correlate avemag medmag;
(obs=664)

             |   avemag   medmag
-------------+------------------
      avemag |   1.0000
      medmag |   0.9981   1.0000


. correlate avemag medmag if avemag~=1;
(obs=373)

             |   avemag   medmag
-------------+------------------
      avemag |   1.0000
      medmag |   0.9981   1.0000


. *     ****************************************************************  *;
. *       Correlation is extremely high in both cases i.e. greater than   *;
. *       99%.                                                            *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *       Generate interaction variables ready for regressions.           *;
. *     ****************************************************************  *;
. generate logmag=ln(avemag);
(17 missing values generated)

. generate uppertier_eneg = uppertier*eneg;
(173 missing values generated)

. generate logmag_eneg = logmag*eneg;
(148 missing values generated)

. generate proximity1_enpres = proximity1*enpres;
(6 missing values generated)

. *     ****************************************************************  *;
. *       Need to drop elections that use a fused vote in legislative     *;
. *       and presidential elections.                                     *;
. *       Drop Bolivia, Uruguay, Honduras up to and including the 1993    *;
. *       elections, Guatemala elections in 1990 (fused vote with         *;
. *       national district), Dominican Republic elections in 1966, 1970, *;
. *       1974 and 1986.                                                  *;
. *     ****************************************************************  *;
. drop if countrynumber==67;
(6 observations deleted)

. drop if countrynumber==76;
(10 observations deleted)

. drop if countrynumber==59 & year==1957;
(1 observation deleted)

. drop if countrynumber==59 & year==1971;
(1 observation deleted)

. drop if countrynumber==59 & year==1985;
(1 observation deleted)

. drop if countrynumber==59 & year==1989;
(1 observation deleted)

. drop if countrynumber==59 & year==1993;
(1 observation deleted)

. drop if countrynumber==57 & year==1990;
(1 observation deleted)

. drop if countrynumber==54 & year==1966;
(1 observation deleted)

. drop if countrynumber==54 & year==1970;
(1 observation deleted)

. drop if countrynumber==54 & year==1974;
(1 observation deleted)

. drop if countrynumber==54 & year==1986;
(1 observation deleted)

. *     ****************************************************************  *;
. *       Drop those countries where enep1 others are greater than 15% of *;
. *       the vote or seats.                                              *;
. *     ****************************************************************  *;
. drop if enep_others>15 & enep_others<100;
(29 observations deleted)

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *       Now, let's run some cross-sections for the 1990s. In the paper, *;
. *       I drop countries with non-compensatory upper tier seats. Before *;
. *       I do this, let me check that nothing changes if I include these *;
. *       observations.                                                   *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *                               1990s                                   *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. regress enep1  eneg logmag uppertier enpres proximity1 logmag_eneg uppertier_eneg   proximity1_enpres i
> f nineties==1;

      Source |       SS       df       MS              Number of obs =      64
-------------+------------------------------           F(  8,    55) =    2.75
       Model |  94.0593678     8   11.757421           Prob > F      =  0.0125
    Residual |  234.914886    55  4.27117974           R-squared     =  0.2859
-------------+------------------------------           Adj R-squared =  0.1821
       Total |  328.974254    63  5.22181355           Root MSE      =  2.0667

------------------------------------------------------------------------------
       enep1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        eneg |   .0269422    .361244     0.07   0.941    -.6970069    .7508913
      logmag |   .5019228   .4332577     1.16   0.252     -.366345    1.370191
   uppertier |   .0110158   .0247416     0.45   0.658    -.0385674    .0605991
      enpres |   .3765634   .2541972     1.48   0.144    -.1328592     .885986
  proximity1 |  -4.077305   1.241768    -3.28   0.002    -6.565863   -1.588747
 logmag_eneg |  -.0882777   .1654578    -0.53   0.596    -.4198624    .2433071
uppertier_~g |  -.0046965   .0100757    -0.47   0.643    -.0248886    .0154957
proximity1~s |   .9662246   .4524954     2.14   0.037     .0594035    1.873046
       _cons |   4.047163   .9331556     4.34   0.000     2.177077    5.917248
------------------------------------------------------------------------------

. regress enep1  eneg logmag uppertier enpres proximity1 logmag_eneg uppertier_eneg   proximity1_enpres i
> f nineties==1 & old==1;

      Source |       SS       df       MS              Number of obs =      41
-------------+------------------------------           F(  8,    32) =    3.51
       Model |   56.588224     8    7.073528           Prob > F      =  0.0051
    Residual |  64.4130735    32  2.01290855           R-squared     =  0.4677
-------------+------------------------------           Adj R-squared =  0.3346
       Total |  121.001298    40  3.02503244           Root MSE      =  1.4188

------------------------------------------------------------------------------
       enep1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        eneg |  -.8536401   .6621682    -1.29   0.207    -2.202433    .4951524
      logmag |  -.6155465   .5808796    -1.06   0.297    -1.798759    .5676665
   uppertier |  -.0040381   .0571388    -0.07   0.944    -.1204261    .1123499
      enpres |   .0584603   .2171643     0.27   0.790    -.3838889    .5008095
  proximity1 |  -4.923934   1.242238    -3.96   0.000    -7.454289   -2.393579
 logmag_eneg |   .6197781   .3385004     1.83   0.076    -.0697246    1.309281
uppertier_~g |  -.0011773   .0380831    -0.03   0.976      -.07875    .0763954
proximity1~s |   1.494623   .4346948     3.44   0.002     .6091782    2.380067
       _cons |   5.303579   1.301578     4.07   0.000     2.652352    7.954807
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       As you will see, these results are qualitatively similar to the *;
. *       results that I get when i drop non-compensatory upper tier      *;
. *       seats.                                                          *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *           Now drop countries with majoritarian uppertiers             *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. drop if countrynumber==132;
(0 observations deleted)

. drop if countrynumber==29;
(7 observations deleted)

. drop if countrynumber==87 & year==1988;
(1 observation deleted)

. drop if countrynumber==87 & year==1992;
(1 observation deleted)

. drop if countrynumber==87 & year==1996;
(1 observation deleted)

. drop if countrynumber==116 & year==1987;
(1 observation deleted)

. drop if countrynumber==116 & year==1996;
(1 observation deleted)

. sum;

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     country |         0
countrynum~r |       754    98.81963    36.61579          3        199
        year |       754    1978.077    16.19747       1946       2000
     legelec |       754           1           0          1          1
    preselec |       754    .1923077    .3943751          0          1
-------------+--------------------------------------------------------
      regime |       754    .0185676    .1350818          0          1
  regime_leg |       754           0           0          0          0
    eighties |       754    .0742706    .2623847          0          1
    nineties |       754    .1206897    .3259825          0          1
         old |       754    .8713528    .3350313          0          1
-------------+--------------------------------------------------------
      avemag |       741    11.13981    26.93199          1        150
   districts |       742    96.95283    145.1366          1        659
        eneg |       638    1.846158    1.159447   1.004012   14.22434
        enep |       715    3.922378    1.899368       1.23      14.89
 enep_others |       714    1.936401    2.708278          0       14.7
-------------+--------------------------------------------------------
       enep1 |       714    3.945658    1.935772       1.23      17.37
        enpp |       744    3.244704    1.480624          1      10.87
 enpp_others |       734    .9271117    2.957076          0       33.3
       enpp1 |       733    3.268117    1.523948          1       11.7
      enpres |       749    1.147922    1.590241          0       6.57
-------------+--------------------------------------------------------
      medmag |       605    12.68678    29.74204          1        150
      newdem |       754    .1405836    .3478222          0          1
  proximity1 |       754    .2675464    .4010189          0          1
  proximity2 |       754    .1909814    .3933354          0          1
       seats |       749    214.1656    165.7556         11        672
-------------+--------------------------------------------------------
  upperseats |       711    15.21238    46.25034          0        344
   uppertier |       711     5.73872    12.78643          0      77.95
twoelections |       754    .0238727    .1527538          0          1
twoelectio~1 |       754    .0119363    .1086716          0          1
      logmag |       741     1.34555    1.277023          0   5.010635
-------------+--------------------------------------------------------
uppertier_~g |       596    8.327443    28.96262          0   415.1962
 logmag_eneg |       625    2.400532    2.834713          0   25.75041
proximity1~s |       749    .7451214    1.235889          0       6.57

.                 *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               So, now let's run stuff - results for Table 2           *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *                               1990s                                   *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. regress enep1  eneg logmag uppertier enpres proximity1 logmag_eneg uppertier_eneg proximity1_enpres if 
> nineties==1;

      Source |       SS       df       MS              Number of obs =      62
-------------+------------------------------           F(  8,    53) =    2.68
       Model |   92.952443     8  11.6190554           Prob > F      =  0.0149
    Residual |  229.536943    53  4.33088571           R-squared     =  0.2882
-------------+------------------------------           Adj R-squared =  0.1808
       Total |  322.489386    61  5.28671124           Root MSE      =  2.0811

------------------------------------------------------------------------------
       enep1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        eneg |   .0613964   .3706241     0.17   0.869    -.6819814    .8047741
      logmag |   .5085673   .4427983     1.15   0.256    -.3795737    1.396708
   uppertier |   .0110839   .0249267     0.44   0.658    -.0389128    .0610806
      enpres |   .3641716    .256832     1.42   0.162    -.1509681    .8793112
  proximity1 |  -4.193668   1.257578    -3.33   0.002    -6.716051   -1.671285
 logmag_eneg |   -.094655   .1682791    -0.56   0.576    -.4321801      .24287
uppertier_~g |  -.0049182   .0101479    -0.48   0.630    -.0252723    .0154358
proximity1~s |   .9853715   .4564818     2.16   0.035      .069785    1.900958
       _cons |   4.075231    .953931     4.27   0.000     2.161888    5.988574
------------------------------------------------------------------------------

. regress enep1  eneg logmag uppertier enpres proximity1 logmag_eneg uppertier_eneg proximity1_enpres if 
> nineties==1 & old==1;

      Source |       SS       df       MS              Number of obs =      39
-------------+------------------------------           F(  8,    30) =    3.49
       Model |  55.6332995     8  6.95416244           Prob > F      =  0.0058
    Residual |  59.7070908    30  1.99023636           R-squared     =  0.4823
-------------+------------------------------           Adj R-squared =  0.3443
       Total |   115.34039    38  3.03527343           Root MSE      =  1.4108

------------------------------------------------------------------------------
       enep1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        eneg |  -.7031101   .6770489    -1.04   0.307    -2.085829    .6796083
      logmag |  -.6097395   .5888591    -1.04   0.309     -1.81235    .5928713
   uppertier |  -.0216025   .0579746    -0.37   0.712    -.1400024    .0967973
      enpres |   .0670865   .2162072     0.31   0.758    -.3744675    .5086405
  proximity1 |  -4.950411   1.238506    -4.00   0.000    -7.479778   -2.421043
 logmag_eneg |   .6251697   .3403313     1.84   0.076    -.0698796    1.320219
uppertier_~g |   .0125473   .0389408     0.32   0.750    -.0669804    .0920751
proximity1~s |   1.422728   .4350304     3.27   0.003      .534277    2.311178
       _cons |   5.152051   1.324638     3.89   0.001     2.446778    7.857323
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *                       So, now let's try pooling                       *;
. *     ****************************************************************  *;
. sum;

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     country |         0
countrynum~r |       754    98.81963    36.61579          3        199
        year |       754    1978.077    16.19747       1946       2000
     legelec |       754           1           0          1          1
    preselec |       754    .1923077    .3943751          0          1
-------------+--------------------------------------------------------
      regime |       754    .0185676    .1350818          0          1
  regime_leg |       754           0           0          0          0
    eighties |       754    .0742706    .2623847          0          1
    nineties |       754    .1206897    .3259825          0          1
         old |       754    .8713528    .3350313          0          1
-------------+--------------------------------------------------------
      avemag |       741    11.13981    26.93199          1        150
   districts |       742    96.95283    145.1366          1        659
        eneg |       638    1.846158    1.159447   1.004012   14.22434
        enep |       715    3.922378    1.899368       1.23      14.89
 enep_others |       714    1.936401    2.708278          0       14.7
-------------+--------------------------------------------------------
       enep1 |       714    3.945658    1.935772       1.23      17.37
        enpp |       744    3.244704    1.480624          1      10.87
 enpp_others |       734    .9271117    2.957076          0       33.3
       enpp1 |       733    3.268117    1.523948          1       11.7
      enpres |       749    1.147922    1.590241          0       6.57
-------------+--------------------------------------------------------
      medmag |       605    12.68678    29.74204          1        150
      newdem |       754    .1405836    .3478222          0          1
  proximity1 |       754    .2675464    .4010189          0          1
  proximity2 |       754    .1909814    .3933354          0          1
       seats |       749    214.1656    165.7556         11        672
-------------+--------------------------------------------------------
  upperseats |       711    15.21238    46.25034          0        344
   uppertier |       711     5.73872    12.78643          0      77.95
twoelections |       754    .0238727    .1527538          0          1
twoelectio~1 |       754    .0119363    .1086716          0          1
      logmag |       741     1.34555    1.277023          0   5.010635
-------------+--------------------------------------------------------
uppertier_~g |       596    8.327443    28.96262          0   415.1962
 logmag_eneg |       625    2.400532    2.834713          0   25.75041
proximity1~s |       749    .7451214    1.235889          0       6.57

. regress enep1  eneg logmag uppertier enpres proximity1 logmag_eneg uppertier_eneg proximity1_enpres, ro
> bust cluster(country);

Linear regression                                      Number of obs =     555
                                                       F(  8,    79) =   12.86
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.2989
Number of clusters (country) = 80                      Root MSE      =  1.5906

------------------------------------------------------------------------------
             |               Robust
       enep1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        eneg |   .1917633   .1293856     1.48   0.142    -.0657722    .4492988
      logmag |   .3302759   .1957386     1.69   0.095    -.0593322    .7198839
   uppertier |   .0475582   .0155535     3.06   0.003     .0165997    .0785167
      enpres |   .3451925   .1646745     2.10   0.039     .0174161    .6729689
  proximity1 |  -3.417589   .5518059    -6.19   0.000    -4.515931   -2.319246
 logmag_eneg |   .0758903   .1165246     0.65   0.517    -.1560462    .3078268
uppertier_~g |  -.0155573   .0075137    -2.07   0.042    -.0305129   -.0006017
proximity1~s |   .8004787    .230738     3.47   0.001     .3412062    1.259751
       _cons |   2.810613   .3398966     8.27   0.000     2.134065     3.48716
------------------------------------------------------------------------------

. regress enep1  eneg logmag uppertier enpres proximity1 logmag_eneg uppertier_eneg proximity1_enpres if 
> old==1, robust cluster(country);

Linear regression                                      Number of obs =     487
                                                       F(  8,    48) =   44.37
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.3966
Number of clusters (country) = 49                      Root MSE      =  1.3324

------------------------------------------------------------------------------
             |               Robust
       enep1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        eneg |   .1116036   .1433136     0.78   0.440    -.1765476    .3997548
      logmag |   .0779875   .2305106     0.34   0.737     -.385485      .54146
   uppertier |  -.0565549    .033142    -1.71   0.094    -.1231913    .0100815
      enpres |   .2638475   .1457398     1.81   0.076    -.0291819     .556877
  proximity1 |  -3.097566    .460691    -6.72   0.000    -4.023847   -2.171284
 logmag_eneg |   .2636612   .1704452     1.55   0.128    -.0790419    .6063644
uppertier_~g |   .0591904   .0214311     2.76   0.008     .0161003    .1022804
proximity1~s |   .6831711   .2298721     2.97   0.005     .2209823     1.14536
       _cons |   2.915708   .3472594     8.40   0.000     2.217496     3.61392
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *       What if we did not use robust standard errors clustered by      *;
. *       country? What if we used panel-corrected standard errors?       *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *       To use XTPCSE I can only have one election in each year. So, I  *;
. *       need to drop one election from those years in which a country   *;
. *       had two elections.                                              *;
. *     ****************************************************************  *;
. replace year=. if twoelections1==1;
(9 real changes made, 9 to missing)

. sort country year;

. *     ****************************************************************  *;
. *       Now tsset the data.                                             *;
. *     ****************************************************************  *;
. tsset countrynumber year, yearly;
       panel variable:  countrynumber, 3 to 199
        time variable:  year, 1946 to 2000, but with gaps

. *     ****************************************************************  *;
. *           XTPCSE without lagged dependent variable                    *;
. *     ****************************************************************  *;
. xtpcse enep1 proximity1 enpres  proximity1_enpres uppertier eneg uppertier_eneg  logmag  logmag_eneg, p
> airwise;

Number of gaps in sample:  445
(note: at least one disturbance covariance assumed 0, no common time periods
       between panels)

Linear regression, correlated panels corrected standard errors (PCSEs)

Group variable:   countrynumber                 Number of obs      =       549
Time variable:    year                          Number of groups   =        80
Panels:           correlated (unbalanced)       Obs per group: min =         1
Autocorrelation:  no autocorrelation                           avg =    6.8625
Sigma computed by pairwise selection                           max =        28
Estimated covariances      =      3240          R-squared          =    0.3048
Estimated autocorrelations =         0          Wald chi2(8)       =    396.68
Estimated coefficients     =         9          Prob > chi2        =    0.0000

------------------------------------------------------------------------------
             |           Panel-corrected
       enep1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  proximity1 |  -3.414131   .4851228    -7.04   0.000    -4.364955   -2.463308
      enpres |   .3480324   .0858595     4.05   0.000     .1797509    .5163138
proximity1~s |   .8001461   .1993644     4.01   0.000     .4093991    1.190893
   uppertier |   .0489805    .004769    10.27   0.000     .0396335    .0583276
        eneg |   .1951161   .0990113     1.97   0.049     .0010575    .3891747
uppertier_~g |  -.0157341   .0039458    -3.99   0.000    -.0234677   -.0080004
      logmag |   .3412287   .1276127     2.67   0.007     .0911124     .591345
 logmag_eneg |   .0739624   .0784204     0.94   0.346    -.0797387    .2276634
       _cons |   2.774834   .1918662    14.46   0.000     2.398783    3.150885
------------------------------------------------------------------------------

. xtpcse enep1 proximity1 enpres  proximity1_enpres uppertier eneg uppertier_eneg  logmag  logmag_eneg if
>  old==1, pairwise;

Number of gaps in sample:  410
(note: at least one disturbance covariance assumed 0, no common time periods
       between panels)

Linear regression, correlated panels corrected standard errors (PCSEs)

Group variable:   countrynumber                 Number of obs      =       481
Time variable:    year                          Number of groups   =        49
Panels:           correlated (unbalanced)       Obs per group: min =         1
Autocorrelation:  no autocorrelation                           avg =  9.816327
Sigma computed by pairwise selection                           max =        28
Estimated covariances      =      1225          R-squared          =    0.4044
Estimated autocorrelations =         0          Wald chi2(8)       =    377.06
Estimated coefficients     =         9          Prob > chi2        =    0.0000

------------------------------------------------------------------------------
             |           Panel-corrected
       enep1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  proximity1 |  -3.092755   .3854741    -8.02   0.000     -3.84827    -2.33724
      enpres |   .2693958   .0670248     4.02   0.000     .1380296     .400762
proximity1~s |   .6825936   .1645063     4.15   0.000     .3601672     1.00502
   uppertier |  -.0538668   .0223552    -2.41   0.016    -.0976823   -.0100513
        eneg |   .1158571   .0844197     1.37   0.170    -.0496025    .2813168
uppertier_~g |   .0579728   .0172059     3.37   0.001     .0242498    .0916957
      logmag |   .0891974   .1066656     0.84   0.403    -.1198633    .2982581
 logmag_eneg |   .2612119    .073614     3.55   0.000      .116931    .4054928
       _cons |   2.874002   .1692217    16.98   0.000     2.542334     3.20567
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *           XTPCSE with lagged dependent variable                       *;
. *     ****************************************************************  *;
. sort country year;

. by country: generate enep1_lag=enep1[_n-1];
(139 missing values generated)

. replace enep1_lag = . if newdem==1;
(21 real changes made, 21 to missing)

. set matsize 150;

Current memory allocation

                    current                                 memory usage
    settable          value     description                 (1M = 1024k)
    --------------------------------------------------------------------
    set maxvar         5000     max. variables allowed           1.733M
    set memory           10M    max. data space                 10.000M
    set matsize         150     max. RHS vars in models          0.184M
                                                            -----------
                                                                11.917M

. xtpcse enep1 enep1_lag proximity1 enpres  proximity1_enpres  eneg uppertier_eneg uppertier logmag logma
> g_eneg,pairwise;

Number of gaps in sample:  371
(note: at least one disturbance covariance assumed 0, no common time periods
       between panels)

Linear regression, correlated panels corrected standard errors (PCSEs)

Group variable:   countrynumber                 Number of obs      =       456
Time variable:    year                          Number of groups   =        65
Panels:           correlated (unbalanced)       Obs per group: min =         1
Autocorrelation:  no autocorrelation                           avg =  7.015385
Sigma computed by pairwise selection                           max =        27
Estimated covariances      =      2145          R-squared          =    0.7115
Estimated autocorrelations =         0          Wald chi2(9)       =    740.02
Estimated coefficients     =        10          Prob > chi2        =    0.0000

------------------------------------------------------------------------------
             |           Panel-corrected
       enep1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   enep1_lag |   .7525668   .0592153    12.71   0.000      .636507    .8686266
  proximity1 |  -.9095318   .4659097    -1.95   0.051    -1.822698    .0036344
      enpres |   .0897792   .0591264     1.52   0.129    -.0261065    .2056649
proximity1~s |   .2003056   .1923089     1.04   0.298    -.1766128    .5772241
        eneg |   .1935665   .0613626     3.15   0.002     .0732981    .3138349
uppertier_~g |  -.0087873   .0041255    -2.13   0.033     -.016873   -.0007015
   uppertier |   .0239331   .0065866     3.63   0.000     .0110237    .0368425
      logmag |   .0500811   .1025295     0.49   0.625    -.1508732    .2510353
 logmag_eneg |   .0654895   .0587046     1.12   0.265    -.0495694    .1805485
       _cons |   .4316819   .1829757     2.36   0.018      .073056    .7903077
------------------------------------------------------------------------------

. xtpcse enep1 enep1_lag proximity1 enpres  proximity1_enpres  eneg uppertier_eneg uppertier logmag logma
> g_eneg if old==1,pairwise;

Number of gaps in sample:  359
(note: at least one disturbance covariance assumed 0, no common time periods
       between panels)

Linear regression, correlated panels corrected standard errors (PCSEs)

Group variable:   countrynumber                 Number of obs      =       420
Time variable:    year                          Number of groups   =        42
Panels:           correlated (unbalanced)       Obs per group: min =         1
Autocorrelation:  no autocorrelation                           avg =        10
Sigma computed by pairwise selection                           max =        27
Estimated covariances      =       903          R-squared          =    0.7402
Estimated autocorrelations =         0          Wald chi2(9)       =    896.63
Estimated coefficients     =        10          Prob > chi2        =    0.0000

------------------------------------------------------------------------------
             |           Panel-corrected
       enep1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   enep1_lag |   .7491841   .0649377    11.54   0.000     .6219086    .8764596
  proximity1 |  -.7547854   .4532163    -1.67   0.096    -1.643073    .1335022
      enpres |     .10729    .057464     1.87   0.062    -.0053373    .2199173
proximity1~s |   .0932052   .1896937     0.49   0.623    -.2785876    .4649979
        eneg |   .1220581    .071909     1.70   0.090    -.0188809    .2629972
uppertier_~g |   .0181687   .0168891     1.08   0.282    -.0149334    .0512708
   uppertier |  -.0141436   .0205652    -0.69   0.492    -.0544507    .0261635
      logmag |   .0281921   .1000442     0.28   0.778    -.1678908    .2242751
 logmag_eneg |   .0939568   .0648302     1.45   0.147    -.0331081    .2210217
       _cons |   .5468312   .1921576     2.85   0.004     .1702092    .9234532
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *                                   THE END                             *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. exit;

end of do-file

.  log close
       log:  F:\data\electoral.log
  log type:  text
 closed on:   8 Jun 2006, 15:02:14
---------------------------------------------------------------------------------------------------------
